home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Experimental BBS Explossion 3
/
Experimental BBS Explossion III.iso
/
c
/
cp1.zip
/
BORL2ZIP.C2
< prev
next >
Wrap
Text File
|
1993-05-12
|
3KB
|
98 lines
===========================================================================
BBS: The Abacus * HST/DS * Potterville MI
Date: 05-08-93 (02:30) Number: 34
From: RICARDO GUIMARAES Refer#: NONE
To: DAVE GOMBOC Recvd: NO
Subj: BORL2ZIP.C - 2 OF 2 Conf: (36) C Language
---------------------------------------------------------------------------
/* Part 2 of BORL2ZIP.C */
while( !feof(Source) && !ferror(Source)){
size = fread(buffer,1,BUFSIZE,Source);
fwrite(buffer,1,size,NewFile);
if (ferror(NewFile)){
printf("Error writing %s\n",oname);
exit(1);
}
}
if ( ferror(Source) && !feof(Source) ){
printf("Error reading file %s\n",iname);
exit(1);
}
fclose(Source);
if ( GetMore() ){
strcpy(iname,argv[1]);
strcat(iname,".CA");
strcat(iname,itoa(++counter,str,16));
}
else
done=1;
}
fclose(NewFile);
free(buffer);
printf("Done... \n");
return (0);
}
int GetMore(void)
{
int x,y;
char c;
/* clear keyboard buffer */
while ( kbhit() )
getch();
y=wherey();
gotoxy(1,y);
printf("Should I get [A]nother file or [E]nd? [A]");
x = wherex()-2;
do {
gotoxy(x,y);
c = toupper(getch());
} while ( c!='A' && c!='E' && c!='\r' );
c = (c=='\r') ? 'A' : c ;
putchar(c);
gotoxy(1,y);
if ( c=='A' )
return (1);
else
return (0);
}
int QuitNow(void)
{
int x,y;
char c;
/* clear keyboard buffer */
while ( kbhit() )
getch();
y=wherey();
gotoxy(1,y);
printf("File not found! [R]etry or [Q]uit? [R]");
x = wherex()-2;
do {
gotoxy(x,y);
c = toupper(getch());
} while ( c!='R' && c!='Q' && c!='\r' );
c = (c=='\r') ? 'R' : c ;
putchar(c);
gotoxy(1,y);
if ( c=='Q' )
return (1);
else
return (0);
}
* SLMR 2.1a * Nam Sybillam quidem cumis... vidi in ampulla pendere.
--- WM v2.07/91-0165
* Origin: TrailBlaZer BBS HST * 201-742-1860 Paterson, NJ (1:107/48)
SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1
SEEN-BY: 153/752 154/40 77 157/2 159/100 125 575 950 203/23 209/209 261/1023
SEEN-BY: 280/1 390/1 396/1 5 15 2270/1 2440/5 3603/20